import Vue from 'vue';

import VueRouter from 'vue-router';

import Find from '@/views/Find.vue';
import My from '@/views/My.vue';
import Friend from '../views/Friend.vue';
import NotFound from '@/views/NotFound.vue'
Vue.use(VueRouter);
const router = new VueRouter({
  //修改默认高亮的类名
  linkActiveClass: 'aa',
  linkExactActiveClass: 'bb',

  //修改路由在地址栏的模式
  mode:'history',
  routes: [
    
    //给默认页面
    {
      path: '/',
      redirect: '/find',
    },
    {
      path: '/find',
      component: Find,
    },
    {
      path: '/my',
      component: My,
    },
    {
      path: '/part',
      component: Friend,
    },
    {
      path: '/part/:username/:password',
      component: Friend,
    },
    //找不到页面 404
    {
      path:'*',
      component:NotFound
    }
  ],
});

export default router;
